package com.provider.app.web;

import com.provider.api.CalculateApi;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xujingfeng on 2017/8/3.
 */
@RestController
@RequestMapping("/api")
public class CalculateController implements CalculateApi{

    @Override
    public Integer add(@RequestParam Integer a,@RequestParam Integer b){
        System.out.println("a=" + b + ",b=" + b);
        return a+b;
    }

    @Override
    public Integer subtract(@RequestParam Integer a,@RequestParam Integer b){
        return a-b;
    }

}
